package com.sudo.pojo.bo;

import com.sudo.common.validators.validenum.EnumValue;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author：为道日损 2020-04-26 13:41
 */
public class SysRoleBO {

    @NotBlank(message = "角色名称不能为空")
    private String roleName;

    @NotBlank(message = "角色代码不能为空")
    @Pattern(regexp="[0-9A-Za-z_]{4,15}",message="角色代码必须是4~10位数字、字母或下划线")
    private String roleCode;

    @EnumValue(strValues = {"on","off"} ,message = "状态必须为指定值on/off")
    private String status;

    @Length(max = 255,message = "备注最大长度不超过255位")
    private String note;

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }
}
